﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CSharp.Default"  MasterPageFile="~/Admin/Admin.Master" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>

<asp:Content ID="cphBody" runat="server" ContentPlaceHolderID="cphBody">
<script type="text/javascript">
    var setNewType = false;
    if (!setNewType) {
        setNewType = window.onload = function () {
            var a = document.getElementsByTagName('input');
            for (var i = 0; i < a.length; i++) {
                if (a[i].getAttribute('xtype')) {
                    a[i].setAttribute('type', a[i].getAttribute('xtype'));
                    a[i].removeAttribute('xtype');
                };
            }
        }
    }
</script>

    Default:
    <asp:TextBox ID="txtHtml5" runat="server" meta:resourcekey="txtHtml5Resource1" xtype="Date"></asp:TextBox>
    <asp:Button ID="btnCheck" runat="server" Text="Check" onclick="btnCheck_Click" />
    
    <asp:UpdatePanel ID="upnlLink" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:Label ID="lblMsg" runat="server" meta:resourcekey="lblMsgResource1"></asp:Label>
            <asp:GridView ID="grvList" runat="server" AutoGenerateColumns="False"
            class="table table-striped table-bordered table-hover dataTable no-footer styleGrid"
            ShowFooter = "True" DataKeyNames="routeName" emptydatatext="Không có bản ghi nào."
            onrowcommand="grvList_RowCommand" CellPadding="3" 
                meta:resourcekey="grvListResource1">
                <Columns>
                    <asp:TemplateField HeaderText="routeName" 
                        meta:resourcekey="TemplateFieldResource1">
                        <HeaderTemplate>routeName</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblrouteName" Width = "300px" runat="server" 
                                Text='<%# Eval("routeName") %>' meta:resourcekey="lblrouteNameResource1"></asp:Label>
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:TextBox ID="txtrouteName_Temp" Width = "300px" runat="server" 
                                CssClass="form-control" MaxLength="200" autocomplete="off" 
                                meta:resourcekey="txtrouteName_TempResource1"></asp:TextBox>
                        </FooterTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="routeUrl" 
                        meta:resourcekey="TemplateFieldResource2">
                        <HeaderTemplate>routeUrl</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblrouteUrl" Width = "300px" runat="server" 
                                Text='<%# Eval("routeUrl") %>' meta:resourcekey="lblrouteUrlResource1"></asp:Label>
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:TextBox ID="txtrouteUrl_Temp" Width = "300px" runat="server" 
                                CssClass="form-control" MaxLength="200" autocomplete="off" 
                                meta:resourcekey="txtrouteUrl_TempResource1"></asp:TextBox>
                        </FooterTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="physicalFile" 
                        meta:resourcekey="TemplateFieldResource3">
                        <HeaderTemplate>physicalFile</HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblphysicalFile" runat="server" 
                                Text='<%# Eval("physicalFile") %>' meta:resourcekey="lblphysicalFileResource1"/>
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:TextBox ID="txtphysicalFile_Temp" Width = "300px" runat="server" 
                                CssClass="form-control" MaxLength="200" autocomplete="off" 
                                meta:resourcekey="txtphysicalFile_TempResource1"></asp:TextBox>
                        </FooterTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="sType" meta:resourcekey="TemplateFieldResource4">
                        <HeaderTemplate></HeaderTemplate>
                        <ItemTemplate>
                            <asp:Button ID="btnDelete" runat="server" Text="Xóa" CommandName="cmdDelete" 
                                CommandArgument='<%# Container.DataItemIndex %>' 
                                CssClass="btn btn-warning btn-sm" Width = "45px" 
                                meta:resourcekey="btnDeleteResource1" />
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:Button ID="btnInsert" runat="server" Text="Thêm" 
                                OnClick = "btnInsert_Click" CssClass="btn btn-primary btn-sm" Width = "45px" 
                                meta:resourcekey="btnInsertResource1"/><br />&nbsp;
                        </FooterTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
                <FooterStyle HorizontalAlign="Center" />
                <HeaderStyle BackColor="#66CCFF" HorizontalAlign="Center"/>
            </asp:GridView>
            <br /><br />
            <asp:Button ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" meta:resourcekey="btnSaveResource1" />
            <asp:Button ID="btnCheckRouteTable" runat="server" Text="Check RouteTable" onclick="btnCheckRouteTable_Click" meta:resourcekey="btnCheckRouteTableResource1" />


            <%--<asp:Label ID="Label1" runat="server" Text="<%$ Resources:HomeSI,tt %>" meta:resourceKey="TextDirection" ></asp:Label>--%>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>